SAS is a connection-oriented protocol that allows small computer system interface (SCSI) devices, such as servers and disk drives, to communicate through a network of high-speed serial physical interconnects. Connections among the host devices, e.g. host bus adapters (HBAs), and target hard disk drives (HDDs) are managed by intermediate devices called SAS expanders. The SAS expanders act as connection management agents, much like a switch element, having physical connections to multiple host devices or disk drives simultaneously.
Multiple SAS end devices and SAS expanders can be connected together to form a SAS topology. There can be one or multiple physical links connecting each pair of neighboring devices. When there is a single physical layer (PHY) between two devices, the associated PHY on the SAS device is called a narrow port whose physical link has a dedicated SAS Address. When there are multiple PHYs connecting two devices, the associated PHYs on an expander are considered to be a single wide port as all the associated PHYs are using the same dedicated SAS Address. The term PHY as used herein refers to the circuitry required to implement physical layer function of the open system interconnection (OSI) model.
Each SAS end device, SAS expander, and HBA has a unique dedicated SAS Address. The connection between an SAS end devices to an SAS expander or HBA is a narrow port connection whereas the connection between multiple SAS expanders or between an SAS expander and an HBA can be a narrow port connection, i.e. one physical link or a single wide port connection, i.e. multiple physical links.
The SAS protocol adopts a point-to-point connection mechanism. The SAS end device and HBA communicate with each other through a connection request. The connection request from an HBA or SAS end device flows through a single SAS expander or multiple SAS expanders to reach the SAS end device or HBA. The SAS expander performs a point-to-point connection in order to route the connection request from the source PHY to the target PHY. The communication link is considered set up when a connection request from the SAS end device is accepted by the HBA, or a connection request from the HBA is accepted by the SAS end device. At this point, information can be transferred between the HBA and the SAS end device.
The connection requests from multiple SAS end devices or HBAs can reach the SAS expander device at the same time. The SAS expander has to resolve multiple connection requests targeted for different destination PHYs at the same time by connecting the request source PHY to the target PHY one at a time according to the request priority. When there are multiple source PHYs requesting to be connected to the same target PHY, an arbitration process is required to resolve the connection priority.
The SAS expander supports the least-recently used arbitration fairness as defined in the SAS protocol such that the longer the connection request has been waiting, the greater the chance that the request will win the arbitration. The arbitration priority comprises three parameters: the arbitration wait time (AWT), the source PHY SAS address, and the connection rate (CONNRATE). The AWT indicates the amount of time the source PHY has been waiting for connection to the destination PHY. An expander connection manager (ECM) reads the AWT, SAS address and CONNRATE when performing the arbitration. If two source PHYs that are queuing for the same target PHY have the same AWT, the ECM looks at the SAS address of the source PHYs. The source PHY that has the largest SAS address wins the arbitration. If both source PHYs have the same AWT and SAS address, the source PHY that has the highest CONNRATE wins the arbitration. In the event that the AWT, SAS address and CONNRATE are the same, the ECM arbitrarily picks one of the source PHYs to be connected to the target PHY.
Disadvantageously, depending solely on AWT to decide which source PHY is connected cannot provide a successful quality of service (QoS) scheme because many times some devices are deemed more important than other devices and should receive a higher priority for connection even if their AWT is shorter than less important devices. In particular, some SAS devices may have a higher average response time than others for I/O requests, and those SAS devices should preferably be allowed a higher probability of winning the connection, irrespective of AWT, albeit without starving other SAS device with a lower average response time.
U.S. patent application publication US 2014/0244875, published Aug. 28, 2014 to More et al., the entire contents of which are incorporated herein by reference, teaches a method of SAS device connection according to assigned priorities. Specifically, a priority field is added to each connection request and a priority value is assigned to each source PHY, i.e. to each SAS device. When multiple source PHYs request connection to the same target PHY, the ECM determines the priority level of each source PHY. The source PHY with the highest priority is connected to the target PHY first and a source PHY with a lower priority is connected to the target PHY second. In the event that multiple source PHYs exhibit the same priority level, the connection will be awarded to the source PHY with the longest AWT.
Unfortunately, always connecting the lower priority source PHY after the higher priority source PHY has completed its data transfer may not be desired because it does not provide for differential connection rates. Additionally, no method is described for how the ECM is able to connect the lower priority source PHY if the higher priority source PHY again requests connection.